home *** CD-ROM | disk | FTP | other *** search
/ Team Palmtops 7 / Palmtops_numero07.iso / WinCE / SDKWindowsCE / HandHeldPCPro30 / sdk.exe / Jupiter SDK / data1.cab / MFC / include / afxv_w32.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-02-19  |  6.3 KB  |  244 lines

  1. // This is a part of the Microsoft Foundation Classes C++ library.
  2. // Copyright (C) 1992-1998 Microsoft Corporation
  3. // All rights reserved.
  4. //
  5. // This source code is only intended as a supplement to the
  6. // Microsoft Foundation Classes Reference and related
  7. // electronic documentation provided with the library.
  8. // See these sources for detailed information regarding the
  9. // Microsoft Foundation Classes product.
  10.  
  11. // afxv_w32.h - target version/configuration control for Win32
  12.  
  13. #ifdef _WINDOWS_
  14.     #error WINDOWS.H already included.  MFC apps must not #include <windows.h>
  15. #endif
  16.  
  17. // STRICT is the only supported option (NOSTRICT is no longer supported)
  18. #ifndef STRICT
  19. #define STRICT 1
  20. #endif
  21.  
  22. // certain parts of WINDOWS.H are necessary
  23. #undef NOKERNEL
  24. #undef NOGDI
  25. #undef NOUSER
  26. #undef NODRIVERS
  27. #undef NOLOGERROR
  28. #undef NOPROFILER
  29. #undef NOMEMMGR
  30. #undef NOLFILEIO
  31. #undef NOOPENFILE
  32. #undef NORESOURCE
  33. #undef NOATOM
  34. #undef NOLANGUAGE
  35. #undef NOLSTRING
  36. #undef NODBCS
  37. #undef NOKEYBOARDINFO
  38. #undef NOGDICAPMASKS
  39. #undef NOCOLOR
  40. #undef NOGDIOBJ
  41. #undef NODRAWTEXT
  42. #undef NOTEXTMETRIC
  43. #undef NOSCALABLEFONT
  44. #undef NOBITMAP
  45. #undef NORASTEROPS
  46. #undef NOMETAFILE
  47. #undef NOSYSMETRICS
  48. #undef NOSYSTEMPARAMSINFO
  49. #undef NOMSG
  50. #undef NOWINSTYLES
  51. #undef NOWINOFFSETS
  52. #undef NOSHOWWINDOW
  53. #undef NODEFERWINDOWPOS
  54. #undef NOVIRTUALKEYCODES
  55. #undef NOKEYSTATES
  56. #undef NOWH
  57. #undef NOMENUS
  58. #undef NOSCROLL
  59. #undef NOCLIPBOARD
  60. #undef NOICONS
  61. #undef NOMB
  62. #undef NOSYSCOMMANDS
  63. #undef NOMDI
  64. #undef NOCTLMGR
  65. #undef NOWINMESSAGES
  66.  
  67. #ifndef WIN32
  68. #define WIN32
  69. #endif
  70.  
  71. #ifndef WIN32_LEAN_AND_MEAN
  72. #define WIN32_LEAN_AND_MEAN
  73. #endif
  74.  
  75. #ifdef _UNICODE
  76. #ifndef UNICODE
  77. #define UNICODE         // UNICODE is used by Windows headers
  78. #endif
  79. #endif
  80.  
  81. #ifdef UNICODE
  82. #ifndef _UNICODE
  83. #define _UNICODE        // _UNICODE is used by C-runtime/MFC headers
  84. #endif
  85. #endif
  86.  
  87. #ifdef VC_EXTRALEAN
  88. #define WIN32_EXTRA_LEAN
  89. #define NOSERVICE
  90. #define NOMCX
  91. #define NOIME
  92. #define NOSOUND
  93. #define NOCOMM
  94. #define NOKANJI
  95. #define NORPC
  96. #define NOPROXYSTUB
  97. #define NOIMAGE
  98. #define NOTAPE
  99.  
  100. #ifndef NO_ANSIUNI_ONLY
  101. #ifdef _UNICODE
  102. #define UNICODE_ONLY
  103. #else
  104. #define ANSI_ONLY
  105. #endif
  106. #endif //!NO_ANSIUNI_ONLY
  107.  
  108. #endif //VC_EXTRALEAN
  109.  
  110. /////////////////////////////////////////////////////////////////////////////
  111. // Turn off warnings for /W4
  112. // To resume any of these warning: #pragma warning(default: 4xxx)
  113. // which should be placed after the AFX include files
  114.  
  115. #ifndef ALL_WARNINGS
  116. #pragma warning(disable: 4201)  // winnt.h uses nameless structs
  117. #endif
  118.  
  119. #define _WIN32_WINDOWS 0x0500
  120. #include <windows.h>
  121.  
  122. //WINBUG: some mirroring stuff will be in wingdi.h someday
  123. #ifndef LAYOUT_RTL
  124. //REVIEW: mikeblas hacked in a definition for LAYOUT_LTR
  125. #define LAYOUT_LTR                                 0x00000000    
  126. #define NOMIRRORBITMAP                     0x80000000
  127. #define LAYOUT_RTL                         0x00000001
  128. #define LAYOUT_BTT                         0x00000002
  129. #define LAYOUT_VBH                         0x00000004
  130. #define LAYOUT_BITMAPORIENTATIONPRESERVED  0x00000008
  131. #define META_SETLAYOUT                     0x0149
  132. #define EMR_SETLAYOUT                      115
  133.  
  134. WINGDIAPI DWORD WINAPI SetLayout(HDC, DWORD);
  135. WINGDIAPI DWORD WINAPI GetLayout(HDC);
  136. #endif
  137.  
  138. //WINBUG: some mirroring stuff will be in winuser.h someday
  139. #ifndef WS_EX_LAYOUTRTL
  140. #define WS_EX_NOINHERITLAYOUT              0x00080000L
  141. #define WS_EX_LAYOUTRTL                    0x00200000L
  142. WINUSERAPI BOOL WINAPI GetProcessDefaultLayout(DWORD *pdwDefaultLayout);
  143. WINUSERAPI BOOL WINAPI SetProcessDefaultLayout(DWORD dwDefaultLayout);
  144. #endif
  145.  
  146. //REVIEW_DEANM: Do we need this or is there a better way?
  147. #undef WM_MOUSELAST
  148. #define WM_MOUSELAST 0x0209
  149.  
  150. #if !defined(_WIN32_WCE)
  151. #include <zmouse.h>
  152.  
  153. struct HKEY__;
  154. typedef struct HKEY__ *HKEY;
  155. #endif // _WIN32_WCE
  156.  
  157. #ifndef _INC_COMMCTRL
  158.     #include <commctrl.h>
  159.  
  160.     // Note: We must avoid using TB_ADDBUTTONW and TB_INSERTBUTTONW in the Unicode
  161.     //    build or else MFC42U.DLL will not be compatible with pre-IE4 versions of
  162.     //    COMCTL32.DLL.
  163.     #ifdef TB_ADDBUTTONSA
  164.         #undef TB_ADDBUTTONS
  165.         #define TB_ADDBUTTONS TB_ADDBUTTONSA
  166.     #endif
  167.  
  168.     #ifdef TB_INSERTBUTTONA
  169.         #undef TB_INSERTBUTTON
  170.         #define TB_INSERTBUTTON TB_INSERTBUTTONA
  171.     #endif
  172. #endif
  173.  
  174. #ifndef EXPORT
  175. #define EXPORT
  176. #endif
  177.  
  178. #ifndef _INC_TCHAR
  179.     #include <tchar.h>      // used for ANSI v.s. UNICODE abstraction
  180. #endif
  181. #ifdef _MBCS
  182. #ifndef _INC_MBCTYPE
  183.     #include <mbctype.h>
  184. #endif
  185. #ifndef _INC_MBSTRING
  186.     #include <mbstring.h>
  187. #endif
  188. #endif
  189.  
  190. /////////////////////////////////////////////////////////////////////////////
  191. // Now for the Windows API specific parts
  192.  
  193. // WM_CTLCOLOR for 16 bit API compatability
  194. #define WM_CTLCOLOR     0x0019
  195.  
  196. // Win32 uses macros with parameters for this, which breaks C++ code.
  197. #ifdef GetWindowTask
  198. #undef GetWindowTask
  199. AFX_INLINE HTASK GetWindowTask(HWND hWnd)
  200.     { return (HTASK)::GetWindowThreadProcessId(hWnd, NULL); }
  201. #endif
  202.  
  203. // Win32 uses macros with parameters for this, which breaks C++ code.
  204. #ifdef GetNextWindow
  205. #undef GetNextWindow
  206. AFX_INLINE HWND GetNextWindow(HWND hWnd, UINT nDirection)
  207.     { return ::GetWindow(hWnd, nDirection); }
  208. #endif
  209.  
  210. // Avoid Win95 mapping CToolBar::DrawState to DrawState[A/W]
  211. #ifdef DrawState
  212. #undef DrawState
  213. AFX_INLINE BOOL WINAPI DrawState(HDC hdc, HBRUSH hbr, DRAWSTATEPROC lpOutputFunc,
  214.     LPARAM lData, WPARAM wData, int x, int y, int cx, int cy, UINT fuFlags)
  215. #ifdef UNICODE
  216.     { return ::DrawStateW(hdc, hbr, lpOutputFunc, lData, wData, x, y, cx, cy,
  217.         fuFlags); }
  218. #else
  219.     { return ::DrawStateA(hdc, hbr, lpOutputFunc, lData, wData, x, y, cx, cy,
  220.         fuFlags); }
  221. #endif
  222. #endif
  223.  
  224. // Avoid Win95 mapping CStatusBar::DrawStatusText to DrawStatusText[A/W]
  225. #ifdef DrawStatusText
  226. #undef DrawStatusText
  227. AFX_INLINE void WINAPI DrawStatusText(HDC hDC, LPRECT lprc, LPCTSTR szText,
  228.     UINT uFlags)
  229. #ifdef UNICODE
  230.     { ::DrawStatusTextW(hDC, lprc, szText, uFlags); }
  231. #else
  232.     { ::DrawStatusTextA(hDC, lprc, szText, uFlags); }
  233. #endif
  234. #endif
  235.  
  236. // FreeResource is not required on Win32 platforms
  237. #undef FreeResource
  238. AFX_INLINE BOOL WINAPI FreeResource(HGLOBAL) { return TRUE; }
  239. // UnlockResource is not required on Win32 platforms
  240. #undef UnlockResource
  241. AFX_INLINE int WINAPI UnlockResource(HGLOBAL) { return 0; }
  242.  
  243. /////////////////////////////////////////////////////////////////////////////
  244.